[#escape x as x?html]
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>文章编辑</title>
[#include "/include/main.ftl"]
       [#include "/include/popdialog.ftl"]
        <script type="text/javascript" language="JavaScript" src="/nxl/js/ckeditor/ckeditor.js"></script>
</head>
<body>
[#if obj.saved??]
    <script>closeDialog()</script>
[#else]
<form name="mainForm" id="mainForm" method="post" action="/nxl/manager/saveContent">
<INPUT TYPE="hidden" NAME="sn" VALUE="${obj.nxlcontentObj.sn!''}">
                    <INPUT TYPE="hidden" NAME="dirSn" VALUE="${obj.nxlcontentObj.dirSn!''}">
<INPUT TYPE="hidden" NAME="createTime" VALUE="${(obj.nxlcontentObj.createTime?string('yyyy-MM-dd HH:mm:ss'))!''}">
<p>本文章地址：/nxl/info/content/${obj.nxlcontentObj.sn}</p>
<p>
内容类型<select id="ctype" name="ctype">
  <option value="content" selected>文章</option>
  <option value="link">链接</option>
</select> 
<script>$("#ctype").val("${(obj.nxlcontentObj.ctype)!'123'}");</script></p>
<p>
链接地址<input type="text"  size="40" id="contentLink" name="contentLink" class="max-length-40 ">
[#if (obj.nxlcontentObj.ctype)?default('') == 'link']
<script>$("#contentLink").val("${(obj.nxlcontentObj.content)!''}");</script>
[/#if]
</p>

标题  <input type="text"  size="40" id="title" name="title" class="max-length-40 ">

<script>$("#title").val("${(obj.nxlcontentObj.title)!''}");</script></p>
<p>
  内容
<textarea id="content" name="content" cols="200" rows="20"></textarea>
                    <script type="text/javascript">
                        var editor = CKEDITOR.replace( 'content',
                        {
                            language:'zh-cn',
                            toolbar :
                            [
                                ['Source','-','Save','NewPage','Preview','-','Templates'],
                                ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
                                '/',
                                ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
                                ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
                                '/',
                                ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
                                ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
                                ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
                                ['Link','Unlink','Anchor'],
                                ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
                                '/',
                                ['Styles','Format','Font','FontSize'],
                                ['TextColor','BGColor']
                            ]

                        });

                        var oEditor1 = CKEDITOR.instances.content;
						[#if (obj.nxlcontentObj.ctype)?default('') != 'link']
                        oEditor1.setData("[#noescape ]${((obj.nxlcontentObj.content)!'')?js_string}[/#noescape]");
						[/#if]
                    </script>

 </p>
<p>
显示顺序  <input type="text"  size="20" id="dispOrder" name="dispOrder" class="validate-number ">

<script>$("#dispOrder").val("${(obj.nxlcontentObj.dispOrder)!''}");</script>
 </p>
<p>
  <input type="submit" name="button" id="button" value="提交">
</p>

</form>
[/#if]
</body>
</html>
[/#escape]
